package com.ft.mq;

import java.util.Date;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Service;

@Service
@RabbitListener(queues = "foo")
public class MQReceiver {
		
	@RabbitHandler
	public void process(@Payload String foo) {
		System.out.println("Receiver---"+new Date() + " 接受消息: " + foo);
	}
}
